<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title> XBMC PDA Control </title>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<link rel="stylesheet" type="text/css" href="style.css" />
	</head>
	<body>
	<div id="inhalt">
<% var z; %>
<% var n; %>
<% var i; %>
<% n = xbmcCommand("catalog","items"); %>
<% i = xbmcCommand("catalog","first"); %>


<%
	var maxPerPage = 10;

	if (!isset("zoff")) {
		zoff=0;
	}
	if (zoff > (n-maxPerPage)) {
		zoff = n-maxPerPage;
	}
	if (zoff < 0) {
		zoff = 0;
	}

	var maxThisPage = zoff + maxPerPage;

	if (maxThisPage > n) {
		maxThisPage = n;
	}

	write("[Showing " + (zoff+1) + " to " + (maxThisPage) + " of " + (n) + "]");

%>
</div>
<div id="inhalt">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="90%" id="AutoNumber1" height="23">
<%
	for (z=0; z<maxThisPage; z=z+1) {
		if ((i == "..") || ((z >= zoff) && (z < maxThisPage))) {
			write("<tr>" + \
				"<td width='100%' height='20'>" + \
				"<a href='/xbmcCmds/xbmcForm?command=catalog&amp;parameter=select," + z + "&amp;redirect=pda_browse.asp%3Fzoff%3D" + zoff + "'>" + \
				i + \
				"</a></td></tr>");
		}

		i = xbmcCommand("catalog","next");
   } %>
</table>
</div>

			<div id="inhalt">
<%
	write("<a href='pda_browse.asp?zoff=" + (zoff-(10*maxPerPage)) + "'>First</a> | ");
	write("<a href='pda_browse.asp?zoff=" + (zoff+maxPerPage) + "'>Next</a> | ");
	write("<a href='pda_browse.asp?zoff=" + (zoff-maxPerPage) + "'>Previous</a> | ");
	write("<a href='pda_browse.asp?zoff=" + (zoff+(10*maxPerPage)) + "'>Last</a> | ");
	write("<a href='pda.asp'>Home</a>");
	
%>
</div>
	</body>
</html>